{yun:}include file="$wapstyle/member/cheader.htm"{/yun}
<section class="wap_member">
    <div class="wap_member_comp_h1" style="position:relative"><span>猎头职位管理</span></div>

    {yun:}if !empty($rows){/yun}
    <div class="wap_member_job_show">

        {yun:}foreach item=v from=$rows{/yun}
        <div class="wap_member_msg ">
            <div class="wap_member_date">
                <span class="yun_m_job_date_n">&nbsp;
							<a href="{yun:}url m=wap c=post a=jobcomshow id=$v.id{/yun}" class="job_list_jobname com_member_hr_cblue">{yun:}$v.job_name{/yun}</a>
						</span>

                <div class="wap_member_date_r">
                    {yun:}if $v.status==1{/yun} 已审核 {yun:}elseif $v.status==3{/yun}
                    <span class="wap_member_wtg" onclick="layermsg('{yun:}$v.statusbody{/yun}');return false;">未通过</span> {yun:}elseif $v.status==0{/yun}
                    <em>未审核</em> {yun:}/if{/yun}
                </div>
            </div>

            <div class="yun_m_job_list_zt">浏览量：{yun:}$v.hits{/yun}</div>
            <div class="yun_m_job_list_zt">更新时间：{yun:}$v.lastupdate|date_format:"%Y-%m-%d"{/yun}</div>

            <div class="yun_member_bth">

                <a href="javascript:layer_del('确定要删除？','index.php?c=ltjobdel&id={yun:}$v.id{/yun}');" class="yun_member_sub  yun_member_bth1">删除</a>

                {yun:}if $v.status==1{/yun}
                <a class="yun_member_sub  yun_member_bth1" href="javascript:void(0)" onclick="refreshLtJobWap('{yun:}$v.id{/yun}');">刷新</a>
                {yun:}/if{/yun}

                <a href="index.php?c=lt_jobadd&id={yun:}$v.id{/yun}" class="yun_member_sub yun_member_bth2">修改</a>
                {yun:}if $v.status==1{/yun}
                {yun:}if $v.zp_status==1{/yun}
                <a href="javascript:void(0)" onclick="layer_del('','index.php?c=ltjobset&status=2&id={yun:}$v.id{/yun}')" class="yun_member_sub yun_member_bth3"><span class="yun_member_yzt">已下架</span>上架招聘</a>
                {yun:}else{/yun}
                <a href="javascript:void(0)" onclick="layer_del('','index.php?c=ltjobset&status=1&id={yun:}$v.id{/yun}')" class="yun_member_sub yun_member_bth3">下架</a>
                {yun:}/if{/yun}
                {yun:}/if{/yun}

            </div>
        </div>
        {yun:}/foreach{/yun}

        <div class="pages" style="margin-top:10px;"> {yun:}$pagenav{/yun}</div>
    </div>

    {yun:}else{/yun}
    	<div class="wap_member_no">您还没有发布猎头职位。
        <div class=""><a href="javascript:void(0);" onclick="jobadd_url('{yun:}$addjobnum{/yun}','{yun:}$config.integral_job{/yun}','ltjob','{yun:}$config.com_integral_online{/yun}','{yun:}$config.integral_proportion{/yun}');" class="wap_member_no_submit" >发布猎头职位</a></div></div>
    {yun:}/if{/yun}
  
</section>

<script>
    function refreshLtJobWap(jobId) {
        var weburl 		= 	'{yun:}url m=wap{/yun}';
        var ajaxUrl 	= 	weburl + "member/index.php?c=ltjobset";
        var integral 	= 	'{yun:}$config.integral_jobefresh{/yun}';
        var online 		= 	'{yun:}$config.com_integral_online{/yun}';
        var pro 		= 	'{yun:}$config.integral_proportion{/yun}';
		
        layer_load('执行中，请稍候');
        
        $.post(ajaxUrl, { ltjobid: jobId }, function(data) {
			layer.closeAll(); 
            data = eval('(' + data + ')');

            if(data.error == 1) {
            	
                layermsg(data.msg, 2, function() {
                    window.location.href = '';
                });
            } else if(data.error == 2) {

            	if(online == 3) {
                    var msg = "您的等级特权已用完，继续操作将消费" + integral * pro + "积分，是否继续？";
                } else {
                 	var msg = "您的等级特权已用完，继续操作将消费" + integral + "元，是否继续？";
                }
                
                layer.open({
                	title 	: [ '温馨提示', 'background-color: #FF4351; color:#fff;' ],
                    content	:	msg,
                    btn		: 	['继续', '取消'],
                    shadeClose	: 	false,
                    yes	: function() {
                        window.location.href = "index.php?c=server&server=sxltjob&id=" + jobId;
                    }
                });
            } else {
            	if(data.url){
            		layermsg(data.msg, 2,function(){
						location.href="index.php?c={yun:}if $config.com_vip_type==2||$config.com_vip_type==0{/yun}rating{yun:}else{/yun}time{yun:}/if{/yun}"
					});
            	}else{
            		layermsg(data.msg, 2);
            	}
            }

        });
    }
</script>
{yun:}include file="$wapstyle/footer.htm"{/yun}